Integrand size = 17, antiderivative size = 41 \[ \int \frac {1}{\sqrt {\cos (x)} \sqrt {a+a \cos (x)}} \, dx=\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {\cos (x)} \sqrt {a+a \cos (x)}}\right )}{\sqrt {a}} \]
Time = 0.01 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.78 \[ \int \frac {1}{\sqrt {\cos (x)} \sqrt {a+a \cos (x)}} \, dx=\frac {2 \arctan \left (\frac {\sin \left (\frac {x}{2}\right )}{\sqrt {\cos (x)}}\right ) \cos \left (\frac {x}{2}\right )}{\sqrt {a (1+\cos (x))}} \]
Time = 0.24 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {3042, 3261, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\sqrt {\cos (x)} \sqrt {a \cos (x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sqrt {\sin \left (x+\frac {\pi }{2}\right )} \sqrt {a \sin \left (x+\frac {\pi }{2}\right )+a}}dx\) |
\(\Big \downarrow \) 3261 |
\(\displaystyle -2 a \int \frac {1}{\frac {\sin (x) \tan (x) a^3}{\cos (x) a+a}+2 a^2}d\left (-\frac {a \sin (x)}{\sqrt {\cos (x)} \sqrt {\cos (x) a+a}}\right )\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {\cos (x)} \sqrt {a \cos (x)+a}}\right )}{\sqrt {a}}\) |
3.3.62.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e _.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(a/f) Subst[Int[1/(2*b^2 - (a*c - b*d)*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*S in[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Time = 1.46 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.98
method | result | size |
default | \(-\frac {\sqrt {\frac {\cos \left (x \right )}{\cos \left (x \right )+1}}\, \sqrt {a \left (\cos \left (x \right )+1\right )}\, \arcsin \left (-\csc \left (x \right )+\cot \left (x \right )\right ) \sqrt {2}}{\sqrt {\cos \left (x \right )}\, a}\) | \(40\) |
-1/cos(x)^(1/2)*(cos(x)/(cos(x)+1))^(1/2)*(a*(cos(x)+1))^(1/2)*arcsin(-csc (x)+cot(x))*2^(1/2)/a
Time = 0.27 (sec) , antiderivative size = 105, normalized size of antiderivative = 2.56 \[ \int \frac {1}{\sqrt {\cos (x)} \sqrt {a+a \cos (x)}} \, dx=\left [\frac {1}{2} \, \sqrt {2} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {a \cos \left (x\right ) + a} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (x\right )} \sin \left (x\right ) - 3 \, \cos \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1}{\cos \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1}\right ), \frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {a \cos \left (x\right ) + a} \sqrt {\cos \left (x\right )} \sin \left (x\right )}{2 \, {\left (\cos \left (x\right )^{2} + \cos \left (x\right )\right )} \sqrt {a}}\right )}{\sqrt {a}}\right ] \]
[1/2*sqrt(2)*sqrt(-1/a)*log(-(2*sqrt(2)*sqrt(a*cos(x) + a)*sqrt(-1/a)*sqrt (cos(x))*sin(x) - 3*cos(x)^2 - 2*cos(x) + 1)/(cos(x)^2 + 2*cos(x) + 1)), s qrt(2)*arctan(1/2*sqrt(2)*sqrt(a*cos(x) + a)*sqrt(cos(x))*sin(x)/((cos(x)^ 2 + cos(x))*sqrt(a)))/sqrt(a)]
\[ \int \frac {1}{\sqrt {\cos (x)} \sqrt {a+a \cos (x)}} \, dx=\int \frac {1}{\sqrt {a \left (\cos {\left (x \right )} + 1\right )} \sqrt {\cos {\left (x \right )}}}\, dx \]
Result contains complex when optimal does not.
Time = 0.57 (sec) , antiderivative size = 323, normalized size of antiderivative = 7.88 \[ \int \frac {1}{\sqrt {\cos (x)} \sqrt {a+a \cos (x)}} \, dx=\frac {\sqrt {2} \arctan \left (\frac {{\left ({\left | e^{\left (i \, x\right )} + 1 \right |}^{4} + \cos \left (x\right )^{4} + \sin \left (x\right )^{4} + 2 \, {\left (\cos \left (x\right )^{2} - \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right )} {\left | e^{\left (i \, x\right )} + 1 \right |}^{2} - 4 \, \cos \left (x\right )^{3} + 2 \, {\left (\cos \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right )} \sin \left (x\right )^{2} + 6 \, \cos \left (x\right )^{2} - 4 \, \cos \left (x\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\frac {2 \, {\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right )}{{\left | e^{\left (i \, x\right )} + 1 \right |}^{2}}, \frac {{\left | e^{\left (i \, x\right )} + 1 \right |}^{2} + \cos \left (x\right )^{2} - \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1}{{\left | e^{\left (i \, x\right )} + 1 \right |}^{2}}\right )\right ) + \sin \left (x\right )}{{\left | e^{\left (i \, x\right )} + 1 \right |}}, \frac {{\left ({\left | e^{\left (i \, x\right )} + 1 \right |}^{4} + \cos \left (x\right )^{4} + \sin \left (x\right )^{4} + 2 \, {\left (\cos \left (x\right )^{2} - \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right )} {\left | e^{\left (i \, x\right )} + 1 \right |}^{2} - 4 \, \cos \left (x\right )^{3} + 2 \, {\left (\cos \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right )} \sin \left (x\right )^{2} + 6 \, \cos \left (x\right )^{2} - 4 \, \cos \left (x\right ) + 1\right )}^{\frac {1}{4}} \sqrt {a} \cos \left (\frac {1}{2} \, \arctan \left (\frac {2 \, {\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right )}{{\left | e^{\left (i \, x\right )} + 1 \right |}^{2}}, \frac {{\left | e^{\left (i \, x\right )} + 1 \right |}^{2} + \cos \left (x\right )^{2} - \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1}{{\left | e^{\left (i \, x\right )} + 1 \right |}^{2}}\right )\right ) + \sqrt {a} \cos \left (x\right ) - \sqrt {a}}{\sqrt {a} {\left | e^{\left (i \, x\right )} + 1 \right |}}\right )}{\sqrt {a}} \]
sqrt(2)*arctan2(((abs(e^(I*x) + 1)^4 + cos(x)^4 + sin(x)^4 + 2*(cos(x)^2 - sin(x)^2 - 2*cos(x) + 1)*abs(e^(I*x) + 1)^2 - 4*cos(x)^3 + 2*(cos(x)^2 - 2*cos(x) + 1)*sin(x)^2 + 6*cos(x)^2 - 4*cos(x) + 1)^(1/4)*sin(1/2*arctan2( 2*(cos(x) - 1)*sin(x)/abs(e^(I*x) + 1)^2, (abs(e^(I*x) + 1)^2 + cos(x)^2 - sin(x)^2 - 2*cos(x) + 1)/abs(e^(I*x) + 1)^2)) + sin(x))/abs(e^(I*x) + 1), ((abs(e^(I*x) + 1)^4 + cos(x)^4 + sin(x)^4 + 2*(cos(x)^2 - sin(x)^2 - 2*c os(x) + 1)*abs(e^(I*x) + 1)^2 - 4*cos(x)^3 + 2*(cos(x)^2 - 2*cos(x) + 1)*s in(x)^2 + 6*cos(x)^2 - 4*cos(x) + 1)^(1/4)*sqrt(a)*cos(1/2*arctan2(2*(cos( x) - 1)*sin(x)/abs(e^(I*x) + 1)^2, (abs(e^(I*x) + 1)^2 + cos(x)^2 - sin(x) ^2 - 2*cos(x) + 1)/abs(e^(I*x) + 1)^2)) + sqrt(a)*cos(x) - sqrt(a))/(sqrt( a)*abs(e^(I*x) + 1)))/sqrt(a)
\[ \int \frac {1}{\sqrt {\cos (x)} \sqrt {a+a \cos (x)}} \, dx=\int { \frac {1}{\sqrt {a \cos \left (x\right ) + a} \sqrt {\cos \left (x\right )}} \,d x } \]
Timed out. \[ \int \frac {1}{\sqrt {\cos (x)} \sqrt {a+a \cos (x)}} \, dx=\int \frac {1}{\sqrt {\cos \left (x\right )}\,\sqrt {a+a\,\cos \left (x\right )}} \,d x \]